#include "stdafx.h"
#include "Module.h"
#include "Application.h"
#include <GL/glfw.h>
#include "Renderer.h"


Renderer::Renderer(Application* owner) : Module(owner)
{
}


Renderer::~Renderer(void)
{
}

void Renderer::init() 
{
	int screenMode = this->owner->getFullScreen() ?  GLFW_FULLSCREEN : GLFW_WINDOW;
	glfwInit();
	glfwOpenWindow(this->owner->getWidth(), this->owner->getHeight(), 5, 6, 5, 0, 0, 0, screenMode);
	glfwSetWindowTitle(this->owner->getTitle().c_str());
}

void Renderer::work()
{
	// todo
}

void Renderer::deinit()
{
	glfwTerminate();
}
